package bot;

import java.util.concurrent.Callable;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicBoolean;

public class Hand implements Callable<AtomicBoolean> {

	@Override
	public AtomicBoolean call() throws Exception {
		CyclicBarrier barrier = new CyclicBarrier(3);
		Leg leg1 = new Leg("leg1", barrier);
		Leg leg2 = new Leg("leg2", barrier);
		Head head = new Head(barrier, leg1, leg2);
//		LOCAL_LOG.info("RoBoT Start");
		leg2.start();
		leg1.start();
		head.start();
		head.join();
		return new AtomicBoolean(true);
	}

}
